package com.qf.blog.config;

import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * User: key
 * ClassName:QiniuYunConfig
 * Date: 2023/6/7
 * Time: 10:56
 * description:
 */
@Configuration
public class QiniuYunConfig {

    // 给IOC容器中放一个UploadManager
    @Bean
    public UploadManager uploadManager(){
        com.qiniu.storage.Configuration cfg = new com.qiniu.storage.Configuration(Region.region2());
        UploadManager uploadManager = new UploadManager(cfg);
        return uploadManager;
    }

}
